import request from '@/utils/request';

//----------------------数据----------------
/**
 * 活动数据
 * @param data
 * @returns
 */
export function staticGroup(data: any) {
    return request({
        url: '/scrm-api/console/market/shuntcode/statistics/group',
        method: 'POST',
        data
    });
}

/**
 * 分流码-列表
 * @param data
 * @returns
 */
export function shuntCodeList(data: any) {
    return request({
        url: '/scrm-api/console/market/shuntcode/list',
        method: 'post',
        data
    });
}
/**
 * 数据概览
 * @param data
 * @returns
 */
export function dataOverView(data: any) {
    return request({
        url: '/scrm-api/console/market/shuntcode/statistics/data-overview',
        method: 'POST',
        data
    });
}

/**
 * 分流码-新建
 * @param data
 * @returns
 */
export function shuntCodeCreate(data: any) {
    return request({
        url: '/scrm-api/console/market/shuntcode/create',
        method: 'post',
        data
    });
}

/**
 * 活动用户明细导出
 * @param data
 * @returns
 */
export function userExport(data: any) {
    return request({
        url: '/scrm-api/console/market/shuntcode/statistics/user/export',
        method: 'POST',
        data
    });
}

/**
 * 分流码-编辑
 * @param data
 * @returns
 */
export function shuntCodeEdit(data: any) {
    return request({
        url: '/scrm-api/console/market/shuntcode/edit',
        method: 'post',
        data
    });
}

/**
 * 活动用户明细
 * @param data
 * @returns
 */
export function staticUser(data: any) {
    return request({
        url: '/scrm-api/console/market/shuntcode/statistics/user',
        method: 'POST',
        data
    });
}

/**
 * 查看详情
 * @param data
 * @returns
 */
export function viewShuntCode(data: any) {
    return request({
        url: '/scrm-api/console/market/shuntcode/view',
        method: 'POST',
        data
    });
}

/**
 * 分流码-查看
 * @param data
 * @returns
 */
export function shuntCodeView(data: any) {
    return request({
        url: '/scrm-api/console/market/shuntcode/view',
        method: 'post',
        data
    });
}

/**
 * 获取引流分组
 * @param data
 * @returns
 */
export function getGroupList(data: any) {
    return request({
        url: '/scrm-api/console/market/shuntcode/group/list',
        method: 'POST',
        data
    });
}

/**
 * 分流码-删除
 * @param data
 * @returns
 */
export function shuntCodeDel(data: any) {
    return request({
        url: '/scrm-api/console/market/shuntcode/del',
        method: 'post',
        data
    });
}

/**
 * 获取员工列表（组件）
 * @param data
 * @returns
 */
export function getWorkList() {
    return request({
        url: '/scrm-api/console/common/work-user/list',
        method: 'POST'
    });
}

/**
 * 分流码-结束
 * @param data
 * @returns
 */
export function shuntCodeEnd(data: any) {
    return request({
        url: '/scrm-api/console/market/shuntcode/end',
        method: 'post',
        data
    });
}

/**
 * 分流码-获取渠道活码列表
 * @param data
 * @returns
 */
export function shuntCodeChannelList(data: any) {
    return request({
        url: '/scrm-api/console/market/shuntcode/base-channel-list',
        method: 'post',
        data,
        noNeedLoading: true
    });
}
